<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<!-- saved from url=(0094)http://web.hand999.com/daili_mobile/ChargeGoldToAgent.php?name=1111111111&card=50.00&id=672607 -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>商户管理系统</title>
<meta name="Keywords" content="">
<meta name="Description" content="">
<meta http-equiv="Cache-Control" content="no-cache">
<meta name="MobileOptimized" content="240">

<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">        
<!-- Mobile Devices Support @begin -->
  
  <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
  <meta content="no-cache" http-equiv="pragma">
  <meta content="0" http-equiv="expires">
  <meta content="telephone=no, address=no" name="format-detection">
  <meta name="apple-mobile-web-app-capable" content="yes"> <!-- apple devices fullscreen -->
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<!-- Mobile Devices Support @end -->
<link rel="stylesheet" type="text/css" href="/admin/agent_admin/Public/home/css/public.css" media="all">
<link rel="stylesheet" type="text/css" href="/admin/agent_admin/Public/home/css/style.css" media="all">
<script src="/admin/agent_admin/Public/home/js/jquery-2.1.0.min.js.下载"></script>
</head>

<body class="body">
	<div class="page_top_box">
    <center>
        <div class="page_top">
            <a href="javascript:void(0)" onclick="history.go(-1)" class="back"><img src="/admin/agent_admin/Public/home/images/ico_back.png"></a>
            <div class="pg_name" onclick="location.reload()">代理充钻</div>
        </div>
    </center>
    </div>
    
    <div class="put_box">
			<?php foreach ($sql as $k=>$v) { ?>
				
			<?php } ?>
		<form id="form1" name="form1" method="post" action="payoff.html?action=tj">

			<!-- <div class="put" style="width=100px"> -->
				<!-- <label class="lb">充值金额：</label> -->
				<!-- <span id="minus" class="mp">-</span><input id="gold" name="gems2" type="number" value="10" class="txt txt1"><span id="plus" class="mp">+</span> -->
			<!-- </div> -->
		<div class="put" style="font-size:1.2em" style="margin-bottom:5%;">
        	<label class="lb">充值金额：</label>
			<!-- <input type=radio name="gems2" value="40"><span style="font-size:0.9em;">40RMB=100钻</span> -->
			<!-- <input style="margin-left:70px;" type=radio name="gems2" value="300"><span style="font-size:0.9em">100RMB=300钻</span> -->
			<!-- <input style="margin-left:22%;margin-top:10%" type=radio name="gems2" value="1000"><span style="font-size:0.9em">350RMB=1000钻</span><br/> -->
			<!-- <input style="margin-left:-10px;margin-top:10%;" type=radio name="gems2" value="3000"><span style="font-size:0.9em">1000RMB=3000钻</span> -->
			<!-- <input style="margin-left:60px;margin-top:10px;" type=radio name="gems2" value="10000"><span style="font-size:0.9em">3000RMB=10000钻</span> -->
		<select id="flag" name="gems2">
			<option value="40" style="color:red">40RMB=100钻</option>	
			<option value="100" style="color:red">100RMB=300钻</option>	
			<option value="350" style="color:red">350RMB=1000钻</option>	
			<option value="1000" style="color:red">1000RMB=3000钻</option>	
			<option value="3000" style="color:red"">3000RMB=10000钻</option>	
		</select>
        </div>
			<div class="put"">
				<label class="lb">充钻方式：</label>

				<select id="flag" name="fangshi">
					<option value="">微信</option>
				</select>
			</div>
			<div class="btn">
				<input type="submit" value="确定" class="btn">
			</div>
		</form>
	</div>
    
    <div class="pg_foot_box">
<center>
    <div class="pg_foot">
        <a href="<?php echo U('Index/indexx') ?>">商户管理平台</a>
    </div>
</center>
</div>    
    <div id="popbg" class="pop_box_bg"></div>
    <div id="ophint" class="op_hint">正在充钻，请稍候...</div>
    
     <div id="hintbox" class="hint_box">
        <span id="hintmsg"></span>
    </div>   
    <script type="text/javascript">
		function checkForm(){
			if($("#gold").val() == 0 || $("#gold").val() == ""){
				hintPop("请输入钻石的数量！"); return false;
			}
			goChargeGold();
		}		
		$("#minus").click(function(){
			var gold = Number($("#gold").val());
			if(gold > 1){
				gold = gold - 1;
				$("#gold").val(gold);
			}
		});
		$("#plus").click(function(){
			var gold = Number($("#gold").val());

			gold = gold + 1;
			$("#gold").val(gold);
		});
		
		$("#popbg").click(function(){
			$("#ophint").css("display", "none");
			$("#popbg").css("display", "none");
		});
		
		function hintPop(msg){
			$("#hintmsg").html(msg);
			$("#hintbox").css({"opacity": "1", "display": "block"});
			$("#hintbox").animate({"bottom":"80px"}, "last", function(){
				setTimeout(function(){
					$("#hintbox").animate({"opacity": "0"}, "last", function(){
						$("#hintbox").css({"bottom":"0px", "display": "none"});
					});
				}, 2000);
			});
		}
			
		$(".game").click(function(){
			if($(this).attr("data-value") == 0){
				$(this).addClass("c");
				$(this).attr("data-value", 1);
			}else{
				$(this).removeClass("c");
				$(this).attr("data-value", 0);
			}
			
			var gtype = "";
			for(var i = 1; i <= 5; i++){
				if($("#gtype" + i).attr("data-value") == 1){
					if(gtype != ""){gtype += ",";}
					gtype += i;
				}
			}
			$("#gametype").val(gtype);
		});
	</script>

</body>


</html> 
<?php
 if($_GET['action']=="tj") { $customerid='155038'; $year_code = array('a','b','c','d','e','f','g','h','i','j'); $order_sn = $year_code[intval(date('y'))-2017]; $sdcustomno= strtoupper(dechex(date('m'))).date('d').substr(time(),-5).substr(microtime(),2,5).sprintf(rand(0,99)); $orderAmount=$_POST['gems2']*100; $cardno='32'; $backurl='http://127.0.0.1/admin/agent_admin/index.php/Home/Index/payoff_jump.html'; $noticeurl='http://127.0.0.1/admin/agent_admin/index.php'; $key='244ca72c106b8eef6c27f2e97bfd93ee'; $mark='123'; $Md5str='customerid='.$customerid.'&sdcustomno='.$sdcustomno.'&orderAmount='.$orderAmount.'&cardno='.$cardno.'&noticeurl='.$noticeurl.'&backurl='.$backurl.$key; $oper_account=($_SESSION['accounts']); $sign=strtoupper(md5($Md5str)); $gourl='http://www.zhifuka.net/gateway/weixin/weixinpay.asp?customerid='.$customerid.'&sdcustomno='.$sdcustomno.'&orderAmount='.$orderAmount.'&cardno='.$cardno.'&noticeurl='.$noticeurl.'&backurl='.$backurl .'&sign='.$sign.'&mark='.$mark; M("","","DB_CONFIG0")->execute("insert into yp_apply_order(oper_account,customer_id,order_no,order_money,pay_mode,mark,goods_name,sign)values('$oper_account','$customerid','$sdcustomno','$orderAmount','$cardno','$mark','$mark','$sign')"); echo "<script language=\"javascript\">"; echo "document.location=\"".$gourl."\""; echo "</script>"; } ?>